﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ByteSite.Common
{
    public static class StringExt
    {
        public static bool IsNullOrEmpty(this string str)
        {
            if (str == null)
            {
                return true;
            }
            else
            {
                if (string.IsNullOrEmpty(str))
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }
        }
        public static bool StartsNotWith(this string str,string value)
        {
            if (str.StartsWith(value))
                return false;
            else
                return true;
        }
        public static bool EndNotWith(this string str, string value)
        {
            if (str.EndsWith(value))
                return false;
            else
                return true;
        }
        public static string ToStr(this object obj)
        {
            if (obj==null)
                return string.Empty;
            else
                return obj.ToString();
        }
    }
}
